Optimal. Leaf size=42 \[ -\frac {\sec (c+d x)}{3 d (a+a \sin (c+d x))}+\frac {2 \tan (c+d x)}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2751, 3852, 8}
\begin {gather*} \frac {2 \tan (c+d x)}{3 a d}-\frac {\sec (c+d x)}{3 d (a \sin (c+d x)+a)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2751
Rule 3852
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac {\sec (c+d x)}{3 d (a+a \sin (c+d x))}+\frac {2 \int \sec ^2(c+d x) \, dx}{3 a}\\ &=-\frac {\sec (c+d x)}{3 d (a+a \sin (c+d x))}-\frac {2 \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 a d}\\ &=-\frac {\sec (c+d x)}{3 d (a+a \sin (c+d x))}+\frac {2 \tan (c+d x)}{3 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 45, normalized size = 1.07 \begin {gather*} \frac {-\cos (2 (c+d x)) \sec (c+d x)+2 \tan (c+d x)}{3 a d (1+\sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 70, normalized size = 1.67
method | result | size |
risch | \(-\frac {4 \left (2 \,{\mathrm e}^{i \left (d x +c \right )}+i\right )}{3 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) d a}\) | \(51\) |
derivativedivides | \(\frac {-\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) | \(70\) |
default | \(\frac {-\frac {2}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}}{d a}\) | \(70\) |
norman | \(\frac {-\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {2}{3 a d}-\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}\) | \(92\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 129 vs.
\(2 (38) = 76\).
time = 0.31, size = 129, normalized size = 3.07 \begin {gather*} \frac {2 \, {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - 1\right )}}{3 \, {\left (a + \frac {2 \, a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2 \, a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 49, normalized size = 1.17 \begin {gather*} -\frac {2 \, \cos \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) - 1}{3 \, {\left (a d \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a d \cos \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.50, size = 67, normalized size = 1.60 \begin {gather*} -\frac {\frac {3}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} + \frac {9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.56, size = 71, normalized size = 1.69 \begin {gather*} -\frac {2\,\left (3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{3\,a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________